home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 406_01 / atoc / strins.c < prev    next >
Text File  |  1993-11-09  |  893b  |  29 lines

  1. /*=========================================================================
  2.  
  3.     ATOC strins module
  4.  
  5. =========================================================================*/
  6.  
  7. #include <stdio.h>
  8. #include "atoc.h"
  9.  
  10.  
  11. /*-------------------------------------------------------------------------
  12. local global variables
  13. -------------------------------------------------------------------------*/
  14. PRIVATE char temp[ MAXLINELENGTH ];    /* temp buffer for end of line */
  15.  
  16.  
  17. /*-------------------------------------------------------------------------
  18. strins( p, s ) inserts string s into the target string at p. We assume
  19. there is room.
  20. -------------------------------------------------------------------------*/
  21. strins( p, s )
  22. char *p, *s;
  23. {
  24.     strcpy( temp, p );
  25.     strcpy( p, s );
  26.     strcat( p, temp );
  27. }
  28. /*=======================================================================*/
  29.